﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.ETL.Domain.Services
{
    public class AccountService
    {
        public ServiceResult<string> Login(string account, string password)
        {
            if(string.IsNullOrEmpty(account))
            {
                return new ServiceResult<string>(false, ErrorCode.InvalidAccount, ErrorCode.String(ErrorCode.InvalidAccount));
            }

            if (string.IsNullOrEmpty(password))
            {
                return new ServiceResult<string>(false, ErrorCode.InvalidPassword, ErrorCode.String(ErrorCode.InvalidPassword));
            }

            return new ServiceResult<string>(true, ErrorCode.COM_NoError, ErrorCode.String(ErrorCode.COM_NoError), account);
        }
    }
}
